<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mikasa Test</title>
<style>
	.blog-wrapper {
		padding:20px 10px 20px 10px;
		border-bottom:1px dotted #eee;
	}
	.blog-title:before {
		content:"标题:";
	}
	.blog-content {
		text-indent:2.4em;
	}
</style>
<link rel="stylesheet" type="text/css" href="<{css_base_url()}>/style.css">
</head>

	<header>Mikasa Framework Test</header>

	<section class="container">
	<div class="right">
		<form style="display:inline;" action="<{$smarty.const.BASE_URL}>/blogs/search" method="get">
			<label for="search_content">搜索:</label>
			<input class="extensible" type="text" name="content" id="search_content" value="<{$keyWord|escape:'html'}>">
			<input type="submit" value="搜索">
		</form>	
		<a href="<{base_url()}>/users/login">登录</a>
	</div>
	
	
	<div>
		<{foreach $blogList as $blog}>
			<div class="blog-wrapper">
				<div class="blog-title"><a href="<{$smarty.const.BASE_URL}>/myblog/<{$blog.id}>"><{$blog.title|escape:'html'}></a></div>
				<div class="blog-content"><{$blog.content|escape:'html'}></div>
				<div>
					<span><{$blog.create_time|simple_date_format}></span>
					<span><a href="<{$smarty.const.BASE_URL}>/blogs/delete?id=<{$blog.id}>">删除</a></span>
					<span><a href="<{$smarty.const.BASE_URL}>/blogs/edit?id=<{$blog.id}>">编辑</a></span>
				
				
				</div>
			</div>
		<{/foreach}>
	</div>
	
	<div>
 		<{pagination($paginationHref,$curPage,$maxPage,2,$params)}>
	</div>
	
	<div class="blank blank-2"></div>
	
	<div>添加博客:
		<form action="<{$smarty.const.BASE_URL}>/blogs/save" method="post">
			<div class="form-group">
				<label for="title">标题:</label>
				<input type="text" name="title" id="title">
			</div>
			<div class="form-group">
				<label for="content">内容:</label>
				<textarea name="content" id="content"></textarea>
			</div>
			<div class="form-group">
				<input type="submit">
			</div>
		</form>
	</div>
	
	</section>
	
	<footer>powered by mikasa!</footer>
</html>